package ui;

import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

public class EditDocumentListener implements DocumentListener {
	//主界面对象
	private MainFrame editorFrame;
	public EditDocumentListener(MainFrame editorFrame) {
		this.editorFrame = editorFrame;
	}
	
	public void changedUpdate(DocumentEvent e) {}
	
	public void insertUpdate(DocumentEvent e) {
		//设置当前编辑的文件的saved属性为false
		this.editorFrame.getCurrentFile().setSaved(false);
	}
	
	public void removeUpdate(DocumentEvent e) {}
}
